In a railroad train, vehicle monitoring control devices are distributed to individual vehicles, and vehicle equipment undergoes monitoring and control of the vehicle monitoring control devices. In addition, a relay device is placed for each set of vehicles. The on-vehicle network of the railroad train is configured by establishing communication connections between the relay devices, and between the relay devices and the vehicle monitoring control devices. By enabling the vehicle monitoring control devices to share monitoring control data on each other via the on-vehicle network, it becomes possible to achieve sophisticated running control or fault diagnostic function.
As for communications between the vehicle monitoring control devices, there are those that require real time quality and occur periodically such as transferring command values to various devices and referring to state values of the devices. In addition, there are those that do not require real time quality or do not occur periodically such as downloading a fault diagnostic result or event log. Here, if the former communication that requires real time quality occurs during the latter communication that does not require real time quality, the latter communication can damage the real time quality of the former communication.
A hindrance in the communication between the vehicle monitoring control devices that require real time quality can have a great influence on the running control of the train. In view of this, Patent Document 1, for example, discloses a prior art that carries out communication that does not require real time quality simultaneously while maintaining the real time quality of the communication that exchanges monitoring control data and the like on the on-vehicle network of the railroad train.
In Patent Document 1, a message is provided with priority information in accordance with the degree of a request for the real time quality. For example, a high priority is given to a message that requires real time quality, and a low priority to a message that does not require real time quality. In addition, the relay devices have priority-specific queues.
In the relay devices, messages received via the on-vehicle network are distributed to the priority-specific queues in accordance with the priority information. The relay devices pick out and relay a message in a high priority queue preferentially, and only when there is no message in the high priority queue, they pick out and relay a message in a low priority queue.    Patent Document 1: Japanese Patent Laid-Open No. 2005-333724 (see Paragraphs 0018-0027 and FIG. 4 and FIG. 6).
Conventionally, trouble occurs when an aperiodic message that does not require real time quality is transmitted right before a periodic message that requires real time quality. In this case, in a relay device, at a time when it stores the message that requires real time quality in the high priority queue, it has already picked out the message that does not require real time quality from the low priority queue and has started relaying. Accordingly, the relay device cannot relay any other message until completing relaying the message that does not require real time quality. This offers a problem of delaying relaying the message that requires real time quality, thereby impairing the real time quality.
The present invention is implemented to solve the foregoing problems. Therefore it is an object of the present invention to provide a train communication system capable of maintaining the real time quality of a message to be communicated periodically in spite of the communication of a message enabled to undergo aperiodic communication, and to provide a communication device and relay device constituting the train communication system.